<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>11111</li>
        <li>22222</li>
        <li>33333</li>
        <li>44444</li>
        <li>55555</li>
        <li>66666</li>
    </ul>
    <ol>
    </ol>
</body>
<script src="https://www.jq22.com/jquery/jquery-3.3.1.js"></script>
<script>
    // 字符串
    var laoshi = '郑君全';
    console.log(laoshi);
    var xuesheng = '罗锦胜';
    console.log(xuesheng);
    console.log(typeof xuesheng)
    // 数字
    var number = 1;
    console.log(number)
    console.log(typeof number)
    // 数组
    var banji = ['罗锦胜','刘淼彬','庞奕铭','李卓文','张家明'];
    console.log(banji)

    console.log(banji[4])
    // 获取数组的长度
    console.log(banji.length)
    console.log(typeof banji)


    // 循环
    for (let index = 0; index < banji.length; index++) {
        console.log(index);
        console.log(banji[index]);
    }


    // 加减乘除
    var i = 0;
    // i = i + 1;
    i++;
    console.log(i)
    i++;
    console.log(i)
    ++i;
    console.log(i)

    var b = 0;
    var sum = 0;
    sum = b++ + ++b + b++ + ++b;
        //    0     2     2     4
    console.log(sum)

    sum = b-- - --b - b-- - --b;
        //   4   -   2 - 2 -0
    console.log(sum)

    var people = {"name":"郑君全","sex":"男","age":29,"tel":"17724254342"};
    console.log(people)
    console.log(people.name)
    console.log(typeof people)



    var list = [11111,22222,33333,44444,55555,66666];
    console.log(list)
    $.each(list, function (indexInArray, valueOfElement) { 
         console.log(indexInArray)
         console.log(valueOfElement)
        //  把li标签追加到ol中
        $('ol').append('<li>'+ valueOfElement +'</li>');
    });

    // 计算1到10的累加
    var sum = 0;
    for (let index = 1; index <= 10; index++) {
        // sum = sum + index;
        sum += index;
    }
    console.log(sum)

    
</script>
</html>